-
Notifications
You must be signed in to change notification settings - Fork 0
Hw3.ftp #5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: master
Are you sure you want to change the base?
Conversation
| @@ -0,0 +1,8 @@ | |||
| Я вас любил: любовь еще, быть может, | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
файлы для тестов обычно кладут в src/test/resources. а вообще для подобных тестов есть очень удобная штука https://junit.org/junit4/javadoc/4.12/org/junit/rules/TemporaryFolder.html
| /** A server that processes two list requests and receives */ | ||
| public class Server { | ||
| /** Value for request list */ | ||
| public static int LIST_REQUEST = 1; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
хорошо бы информацию о сетевом протоколе как-то переиспользовать между клиентом и сервером
| import java.net.Socket; | ||
|
|
||
| /** A server that processes two list requests and receives */ | ||
| public class Server { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
тесты это хорошо, но хотелось бы ещё консольный UI, чтобы запустить клиент и сервер и поперекачивать файлы
| List<Pair<String, Boolean>> files = client.list(dirTestList1.getAbsolutePath() + "/test3"); | ||
| assertEquals(0, files.size()); | ||
|
|
||
| } catch (IOException e) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
в тестах не принято ловить исключения. если тест должен бросать исключение, используйте параметр expected аннотации Test. а если не должен, то пишите throws у метода
No description provided.